__attribute((weak)) uint8_t gap_set_random_device_address(const uint8_t * address) { return (uint8_t)0; }
struct gap_set_random_device_address_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t * address;};
static void gap_set_random_device_address_0(struct gap_set_random_device_address_ctx*ctx,uint16_t _){ctx->_ret =gap_set_random_device_address(ctx->address);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_random_device_address(const uint8_t * address){if(IS_IN_HOST()){return gap_set_random_device_address(address);}else{struct gap_set_random_device_address_ctx ctx = {._event = btstack_mt_event_alloc(),.address = address};CALL_USER_RET(gap_set_random_device_address);}}
__attribute((weak)) uint8_t gap_disconnect(hci_con_handle_t handle) { return (uint8_t)0; }
struct gap_disconnect_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t handle;};
static void gap_disconnect_0(struct gap_disconnect_ctx*ctx,uint16_t _){ctx->_ret =gap_disconnect(ctx->handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_disconnect(hci_con_handle_t handle){if(IS_IN_HOST()){return gap_disconnect(handle);}else{struct gap_disconnect_ctx ctx = {._event = btstack_mt_event_alloc(),.handle = handle};CALL_USER_RET(gap_disconnect);}}
__attribute((weak)) void gap_disconnect_all() { }
struct gap_disconnect_all_ctx {struct btstack_mt_event*_event;};
static void gap_disconnect_all_0(struct gap_disconnect_all_ctx*ctx,uint16_t _){gap_disconnect_all();btstack_mt_event_set(ctx->_event);}
void mt_gap_disconnect_all(){if(IS_IN_HOST()){gap_disconnect_all();}else{struct gap_disconnect_all_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_VOID(gap_disconnect_all);}}
__attribute((weak)) uint8_t gap_add_whitelist(const uint8_t * address,bd_addr_type_t addtype) { return (uint8_t)0; }
struct gap_add_whitelist_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t * address;bd_addr_type_t addtype;};
static void gap_add_whitelist_0(struct gap_add_whitelist_ctx*ctx,uint16_t _){ctx->_ret =gap_add_whitelist(ctx->address,ctx->addtype);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_add_whitelist(const uint8_t * address,bd_addr_type_t addtype){if(IS_IN_HOST()){return gap_add_whitelist(address,addtype);}else{struct gap_add_whitelist_ctx ctx = {._event = btstack_mt_event_alloc(),.address = address,.addtype = addtype};CALL_USER_RET(gap_add_whitelist);}}
__attribute((weak)) uint8_t gap_remove_whitelist(const uint8_t * address,bd_addr_type_t addtype) { return (uint8_t)0; }
struct gap_remove_whitelist_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t * address;bd_addr_type_t addtype;};
static void gap_remove_whitelist_0(struct gap_remove_whitelist_ctx*ctx,uint16_t _){ctx->_ret =gap_remove_whitelist(ctx->address,ctx->addtype);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_remove_whitelist(const uint8_t * address,bd_addr_type_t addtype){if(IS_IN_HOST()){return gap_remove_whitelist(address,addtype);}else{struct gap_remove_whitelist_ctx ctx = {._event = btstack_mt_event_alloc(),.address = address,.addtype = addtype};CALL_USER_RET(gap_remove_whitelist);}}
__attribute((weak)) uint8_t gap_clear_white_lists() { return (uint8_t)0; }
struct gap_clear_white_lists_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_clear_white_lists_0(struct gap_clear_white_lists_ctx*ctx,uint16_t _){ctx->_ret =gap_clear_white_lists();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_clear_white_lists(){if(IS_IN_HOST()){return gap_clear_white_lists();}else{struct gap_clear_white_lists_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_clear_white_lists);}}
__attribute((weak)) uint8_t gap_read_rssi(hci_con_handle_t handle) { return (uint8_t)0; }
struct gap_read_rssi_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t handle;};
static void gap_read_rssi_0(struct gap_read_rssi_ctx*ctx,uint16_t _){ctx->_ret =gap_read_rssi(ctx->handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_rssi(hci_con_handle_t handle){if(IS_IN_HOST()){return gap_read_rssi(handle);}else{struct gap_read_rssi_ctx ctx = {._event = btstack_mt_event_alloc(),.handle = handle};CALL_USER_RET(gap_read_rssi);}}
__attribute((weak)) uint8_t gap_read_remote_used_features(hci_con_handle_t handle) { return (uint8_t)0; }
struct gap_read_remote_used_features_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t handle;};
static void gap_read_remote_used_features_0(struct gap_read_remote_used_features_ctx*ctx,uint16_t _){ctx->_ret =gap_read_remote_used_features(ctx->handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_remote_used_features(hci_con_handle_t handle){if(IS_IN_HOST()){return gap_read_remote_used_features(handle);}else{struct gap_read_remote_used_features_ctx ctx = {._event = btstack_mt_event_alloc(),.handle = handle};CALL_USER_RET(gap_read_remote_used_features);}}
__attribute((weak)) uint8_t gap_read_remote_version(hci_con_handle_t handle) { return (uint8_t)0; }
struct gap_read_remote_version_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t handle;};
static void gap_read_remote_version_0(struct gap_read_remote_version_ctx*ctx,uint16_t _){ctx->_ret =gap_read_remote_version(ctx->handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_remote_version(hci_con_handle_t handle){if(IS_IN_HOST()){return gap_read_remote_version(handle);}else{struct gap_read_remote_version_ctx ctx = {._event = btstack_mt_event_alloc(),.handle = handle};CALL_USER_RET(gap_read_remote_version);}}
__attribute((weak)) uint8_t gap_le_read_channel_map(hci_con_handle_t handle) { return (uint8_t)0; }
struct gap_le_read_channel_map_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t handle;};
static void gap_le_read_channel_map_0(struct gap_le_read_channel_map_ctx*ctx,uint16_t _){ctx->_ret =gap_le_read_channel_map(ctx->handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_le_read_channel_map(hci_con_handle_t handle){if(IS_IN_HOST()){return gap_le_read_channel_map(handle);}else{struct gap_le_read_channel_map_ctx ctx = {._event = btstack_mt_event_alloc(),.handle = handle};CALL_USER_RET(gap_le_read_channel_map);}}
__attribute((weak)) uint8_t gap_read_phy(const uint16_t con_handle) { return (uint8_t)0; }
struct gap_read_phy_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint16_t con_handle;};
static void gap_read_phy_0(struct gap_read_phy_ctx*ctx,uint16_t _){ctx->_ret =gap_read_phy(ctx->con_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_phy(const uint16_t con_handle){if(IS_IN_HOST()){return gap_read_phy(con_handle);}else{struct gap_read_phy_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle};CALL_USER_RET(gap_read_phy);}}
__attribute((weak)) uint8_t gap_set_def_phy(const uint8_t all_phys,const phy_bittypes_t tx_phys,const phy_bittypes_t rx_phys) { return (uint8_t)0; }
struct gap_set_def_phy_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t all_phys;const phy_bittypes_t tx_phys;const phy_bittypes_t rx_phys;};
static void gap_set_def_phy_0(struct gap_set_def_phy_ctx*ctx,uint16_t _){ctx->_ret =gap_set_def_phy(ctx->all_phys,ctx->tx_phys,ctx->rx_phys);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_def_phy(const uint8_t all_phys,const phy_bittypes_t tx_phys,const phy_bittypes_t rx_phys){if(IS_IN_HOST()){return gap_set_def_phy(all_phys,tx_phys,rx_phys);}else{struct gap_set_def_phy_ctx ctx = {._event = btstack_mt_event_alloc(),.all_phys = all_phys,.tx_phys = tx_phys,.rx_phys = rx_phys};CALL_USER_RET(gap_set_def_phy);}}
__attribute((weak)) uint8_t gap_set_phy(const uint16_t con_handle,const uint8_t all_phys,const phy_bittypes_t tx_phys,const phy_bittypes_t rx_phys,const phy_option_t phy_opt) { return (uint8_t)0; }
struct gap_set_phy_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint16_t con_handle;const uint8_t all_phys;const phy_bittypes_t tx_phys;const phy_bittypes_t rx_phys;const phy_option_t phy_opt;};
static void gap_set_phy_0(struct gap_set_phy_ctx*ctx,uint16_t _){ctx->_ret =gap_set_phy(ctx->con_handle,ctx->all_phys,ctx->tx_phys,ctx->rx_phys,ctx->phy_opt);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_phy(const uint16_t con_handle,const uint8_t all_phys,const phy_bittypes_t tx_phys,const phy_bittypes_t rx_phys,const phy_option_t phy_opt){if(IS_IN_HOST()){return gap_set_phy(con_handle,all_phys,tx_phys,rx_phys,phy_opt);}else{struct gap_set_phy_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.all_phys = all_phys,.tx_phys = tx_phys,.rx_phys = rx_phys,.phy_opt = phy_opt};CALL_USER_RET(gap_set_phy);}}
__attribute((weak)) uint8_t gap_set_adv_set_random_addr(const uint8_t adv_handle,const uint8_t * random_addr) { return (uint8_t)0; }
struct gap_set_adv_set_random_addr_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;const uint8_t * random_addr;};
static void gap_set_adv_set_random_addr_0(struct gap_set_adv_set_random_addr_ctx*ctx,uint16_t _){ctx->_ret =gap_set_adv_set_random_addr(ctx->adv_handle,ctx->random_addr);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_adv_set_random_addr(const uint8_t adv_handle,const uint8_t * random_addr){if(IS_IN_HOST()){return gap_set_adv_set_random_addr(adv_handle,random_addr);}else{struct gap_set_adv_set_random_addr_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.random_addr = random_addr};CALL_USER_RET(gap_set_adv_set_random_addr);}}
__attribute((weak)) uint8_t gap_set_ext_scan_para(const bd_addr_type_t own_addr_type,const scan_filter_policy_t filter,const uint8_t config_num,const scan_phy_config_t * configs) { return (uint8_t)0; }
struct gap_set_ext_scan_para_ctx {struct btstack_mt_event*_event;uint8_t _ret;const bd_addr_type_t own_addr_type;const scan_filter_policy_t filter;const uint8_t config_num;const scan_phy_config_t * configs;};
static void gap_set_ext_scan_para_0(struct gap_set_ext_scan_para_ctx*ctx,uint16_t _){ctx->_ret =gap_set_ext_scan_para(ctx->own_addr_type,ctx->filter,ctx->config_num,ctx->configs);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_ext_scan_para(const bd_addr_type_t own_addr_type,const scan_filter_policy_t filter,const uint8_t config_num,const scan_phy_config_t * configs){if(IS_IN_HOST()){return gap_set_ext_scan_para(own_addr_type,filter,config_num,configs);}else{struct gap_set_ext_scan_para_ctx ctx = {._event = btstack_mt_event_alloc(),.own_addr_type = own_addr_type,.filter = filter,.config_num = config_num,.configs = configs};CALL_USER_RET(gap_set_ext_scan_para);}}
__attribute((weak)) uint8_t gap_set_ext_scan_response_data(const uint8_t adv_handle,const uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gap_set_ext_scan_response_data_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;const uint16_t length;const uint8_t * data;};
static void gap_set_ext_scan_response_data_0(struct gap_set_ext_scan_response_data_ctx*ctx,uint16_t _){ctx->_ret =gap_set_ext_scan_response_data(ctx->adv_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_ext_scan_response_data(const uint8_t adv_handle,const uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gap_set_ext_scan_response_data(adv_handle,length,data);}else{struct gap_set_ext_scan_response_data_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.length = length,.data = data};CALL_USER_RET(gap_set_ext_scan_response_data);}}
__attribute((weak)) uint8_t gap_set_ext_scan_enable(const uint8_t enable,const uint8_t filter,const uint16_t duration,const uint16_t period) { return (uint8_t)0; }
struct gap_set_ext_scan_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t enable;const uint8_t filter;const uint16_t duration;const uint16_t period;};
static void gap_set_ext_scan_enable_0(struct gap_set_ext_scan_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_ext_scan_enable(ctx->enable,ctx->filter,ctx->duration,ctx->period);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_ext_scan_enable(const uint8_t enable,const uint8_t filter,const uint16_t duration,const uint16_t period){if(IS_IN_HOST()){return gap_set_ext_scan_enable(enable,filter,duration,period);}else{struct gap_set_ext_scan_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.enable = enable,.filter = filter,.duration = duration,.period = period};CALL_USER_RET(gap_set_ext_scan_enable);}}
__attribute((weak)) uint8_t gap_set_ext_adv_enable(const uint8_t enable,const uint8_t set_number,const ext_adv_set_en_t * adv_sets) { return (uint8_t)0; }
struct gap_set_ext_adv_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t enable;const uint8_t set_number;const ext_adv_set_en_t * adv_sets;};
static void gap_set_ext_adv_enable_0(struct gap_set_ext_adv_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_ext_adv_enable(ctx->enable,ctx->set_number,ctx->adv_sets);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_ext_adv_enable(const uint8_t enable,const uint8_t set_number,const ext_adv_set_en_t * adv_sets){if(IS_IN_HOST()){return gap_set_ext_adv_enable(enable,set_number,adv_sets);}else{struct gap_set_ext_adv_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.enable = enable,.set_number = set_number,.adv_sets = adv_sets};CALL_USER_RET(gap_set_ext_adv_enable);}}
__attribute((weak)) uint8_t gap_set_ext_adv_para(const uint8_t adv_handle,const adv_event_properties_t properties,const uint32_t interval_min,const uint32_t interval_max,const adv_channel_bits_t primary_adv_channel_map,const bd_addr_type_t own_addr_type,const bd_addr_type_t peer_addr_type,const uint8_t * peer_addr,const adv_filter_policy_t adv_filter_policy,const int8_t tx_power,const phy_type_t primary_adv_phy,const uint8_t secondary_adv_max_skip,const phy_type_t secondary_adv_phy,const uint8_t sid,const uint8_t scan_req_notification_enable) { return (uint8_t)0; }
struct gap_set_ext_adv_para_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;const adv_event_properties_t properties;const uint32_t interval_min;const uint32_t interval_max;const adv_channel_bits_t primary_adv_channel_map;const bd_addr_type_t own_addr_type;const bd_addr_type_t peer_addr_type;const uint8_t * peer_addr;const adv_filter_policy_t adv_filter_policy;const int8_t tx_power;const phy_type_t primary_adv_phy;const uint8_t secondary_adv_max_skip;const phy_type_t secondary_adv_phy;const uint8_t sid;const uint8_t scan_req_notification_enable;};
static void gap_set_ext_adv_para_0(struct gap_set_ext_adv_para_ctx*ctx,uint16_t _){ctx->_ret =gap_set_ext_adv_para(ctx->adv_handle,ctx->properties,ctx->interval_min,ctx->interval_max,ctx->primary_adv_channel_map,ctx->own_addr_type,ctx->peer_addr_type,ctx->peer_addr,ctx->adv_filter_policy,ctx->tx_power,ctx->primary_adv_phy,ctx->secondary_adv_max_skip,ctx->secondary_adv_phy,ctx->sid,ctx->scan_req_notification_enable);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_ext_adv_para(const uint8_t adv_handle,const adv_event_properties_t properties,const uint32_t interval_min,const uint32_t interval_max,const adv_channel_bits_t primary_adv_channel_map,const bd_addr_type_t own_addr_type,const bd_addr_type_t peer_addr_type,const uint8_t * peer_addr,const adv_filter_policy_t adv_filter_policy,const int8_t tx_power,const phy_type_t primary_adv_phy,const uint8_t secondary_adv_max_skip,const phy_type_t secondary_adv_phy,const uint8_t sid,const uint8_t scan_req_notification_enable){if(IS_IN_HOST()){return gap_set_ext_adv_para(adv_handle,properties,interval_min,interval_max,primary_adv_channel_map,own_addr_type,peer_addr_type,peer_addr,adv_filter_policy,tx_power,primary_adv_phy,secondary_adv_max_skip,secondary_adv_phy,sid,scan_req_notification_enable);}else{struct gap_set_ext_adv_para_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.properties = properties,.interval_min = interval_min,.interval_max = interval_max,.primary_adv_channel_map = primary_adv_channel_map,.own_addr_type = own_addr_type,.peer_addr_type = peer_addr_type,.peer_addr = peer_addr,.adv_filter_policy = adv_filter_policy,.tx_power = tx_power,.primary_adv_phy = primary_adv_phy,.secondary_adv_max_skip = secondary_adv_max_skip,.secondary_adv_phy = secondary_adv_phy,.sid = sid,.scan_req_notification_enable = scan_req_notification_enable};CALL_USER_RET(gap_set_ext_adv_para);}}
__attribute((weak)) uint8_t gap_set_ext_adv_data(const uint8_t adv_handle,uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gap_set_ext_adv_data_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;uint16_t length;const uint8_t * data;};
static void gap_set_ext_adv_data_0(struct gap_set_ext_adv_data_ctx*ctx,uint16_t _){ctx->_ret =gap_set_ext_adv_data(ctx->adv_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_ext_adv_data(const uint8_t adv_handle,uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gap_set_ext_adv_data(adv_handle,length,data);}else{struct gap_set_ext_adv_data_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.length = length,.data = data};CALL_USER_RET(gap_set_ext_adv_data);}}
__attribute((weak)) uint8_t gap_set_periodic_adv_data(const uint8_t adv_handle,uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gap_set_periodic_adv_data_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;uint16_t length;const uint8_t * data;};
static void gap_set_periodic_adv_data_0(struct gap_set_periodic_adv_data_ctx*ctx,uint16_t _){ctx->_ret =gap_set_periodic_adv_data(ctx->adv_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_periodic_adv_data(const uint8_t adv_handle,uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gap_set_periodic_adv_data(adv_handle,length,data);}else{struct gap_set_periodic_adv_data_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.length = length,.data = data};CALL_USER_RET(gap_set_periodic_adv_data);}}
__attribute((weak)) uint8_t gap_set_periodic_adv_enable(const uint8_t enable,const uint8_t adv_handle) { return (uint8_t)0; }
struct gap_set_periodic_adv_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t enable;const uint8_t adv_handle;};
static void gap_set_periodic_adv_enable_0(struct gap_set_periodic_adv_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_periodic_adv_enable(ctx->enable,ctx->adv_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_periodic_adv_enable(const uint8_t enable,const uint8_t adv_handle){if(IS_IN_HOST()){return gap_set_periodic_adv_enable(enable,adv_handle);}else{struct gap_set_periodic_adv_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.enable = enable,.adv_handle = adv_handle};CALL_USER_RET(gap_set_periodic_adv_enable);}}
__attribute((weak)) uint8_t gap_set_periodic_adv_para(const uint8_t adv_handle,const uint16_t interval_min,const uint16_t interval_max,const periodic_adv_properties_t properties) { return (uint8_t)0; }
struct gap_set_periodic_adv_para_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;const uint16_t interval_min;const uint16_t interval_max;const periodic_adv_properties_t properties;};
static void gap_set_periodic_adv_para_0(struct gap_set_periodic_adv_para_ctx*ctx,uint16_t _){ctx->_ret =gap_set_periodic_adv_para(ctx->adv_handle,ctx->interval_min,ctx->interval_max,ctx->properties);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_periodic_adv_para(const uint8_t adv_handle,const uint16_t interval_min,const uint16_t interval_max,const periodic_adv_properties_t properties){if(IS_IN_HOST()){return gap_set_periodic_adv_para(adv_handle,interval_min,interval_max,properties);}else{struct gap_set_periodic_adv_para_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.interval_min = interval_min,.interval_max = interval_max,.properties = properties};CALL_USER_RET(gap_set_periodic_adv_para);}}
__attribute((weak)) uint8_t gap_clr_adv_set() { return (uint8_t)0; }
struct gap_clr_adv_set_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_clr_adv_set_0(struct gap_clr_adv_set_ctx*ctx,uint16_t _){ctx->_ret =gap_clr_adv_set();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_clr_adv_set(){if(IS_IN_HOST()){return gap_clr_adv_set();}else{struct gap_clr_adv_set_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_clr_adv_set);}}
__attribute((weak)) uint8_t gap_rmv_adv_set(const uint8_t adv_handle) { return (uint8_t)0; }
struct gap_rmv_adv_set_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;};
static void gap_rmv_adv_set_0(struct gap_rmv_adv_set_ctx*ctx,uint16_t _){ctx->_ret =gap_rmv_adv_set(ctx->adv_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_rmv_adv_set(const uint8_t adv_handle){if(IS_IN_HOST()){return gap_rmv_adv_set(adv_handle);}else{struct gap_rmv_adv_set_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle};CALL_USER_RET(gap_rmv_adv_set);}}
__attribute((weak)) uint8_t gap_periodic_adv_create_sync(const periodic_adv_filter_policy_t filter_policy,const uint8_t adv_sid,const bd_addr_type_t addr_type,const uint8_t * addr,const uint16_t skip,const uint16_t sync_timeout,const uint8_t sync_cte_type) { return (uint8_t)0; }
struct gap_periodic_adv_create_sync_ctx {struct btstack_mt_event*_event;uint8_t _ret;const periodic_adv_filter_policy_t filter_policy;const uint8_t adv_sid;const bd_addr_type_t addr_type;const uint8_t * addr;const uint16_t skip;const uint16_t sync_timeout;const uint8_t sync_cte_type;};
static void gap_periodic_adv_create_sync_0(struct gap_periodic_adv_create_sync_ctx*ctx,uint16_t _){ctx->_ret =gap_periodic_adv_create_sync(ctx->filter_policy,ctx->adv_sid,ctx->addr_type,ctx->addr,ctx->skip,ctx->sync_timeout,ctx->sync_cte_type);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_periodic_adv_create_sync(const periodic_adv_filter_policy_t filter_policy,const uint8_t adv_sid,const bd_addr_type_t addr_type,const uint8_t * addr,const uint16_t skip,const uint16_t sync_timeout,const uint8_t sync_cte_type){if(IS_IN_HOST()){return gap_periodic_adv_create_sync(filter_policy,adv_sid,addr_type,addr,skip,sync_timeout,sync_cte_type);}else{struct gap_periodic_adv_create_sync_ctx ctx = {._event = btstack_mt_event_alloc(),.filter_policy = filter_policy,.adv_sid = adv_sid,.addr_type = addr_type,.addr = addr,.skip = skip,.sync_timeout = sync_timeout,.sync_cte_type = sync_cte_type};CALL_USER_RET(gap_periodic_adv_create_sync);}}
__attribute((weak)) uint8_t gap_periodic_adv_create_sync_cancel() { return (uint8_t)0; }
struct gap_periodic_adv_create_sync_cancel_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_periodic_adv_create_sync_cancel_0(struct gap_periodic_adv_create_sync_cancel_ctx*ctx,uint16_t _){ctx->_ret =gap_periodic_adv_create_sync_cancel();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_periodic_adv_create_sync_cancel(){if(IS_IN_HOST()){return gap_periodic_adv_create_sync_cancel();}else{struct gap_periodic_adv_create_sync_cancel_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_periodic_adv_create_sync_cancel);}}
__attribute((weak)) uint8_t gap_periodic_adv_term_sync(const uint16_t sync_handle) { return (uint8_t)0; }
struct gap_periodic_adv_term_sync_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint16_t sync_handle;};
static void gap_periodic_adv_term_sync_0(struct gap_periodic_adv_term_sync_ctx*ctx,uint16_t _){ctx->_ret =gap_periodic_adv_term_sync(ctx->sync_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_periodic_adv_term_sync(const uint16_t sync_handle){if(IS_IN_HOST()){return gap_periodic_adv_term_sync(sync_handle);}else{struct gap_periodic_adv_term_sync_ctx ctx = {._event = btstack_mt_event_alloc(),.sync_handle = sync_handle};CALL_USER_RET(gap_periodic_adv_term_sync);}}
__attribute((weak)) uint8_t gap_add_dev_to_periodic_list(const uint8_t addr_type,const uint8_t * addr,const uint8_t sid) { return (uint8_t)0; }
struct gap_add_dev_to_periodic_list_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t addr_type;const uint8_t * addr;const uint8_t sid;};
static void gap_add_dev_to_periodic_list_0(struct gap_add_dev_to_periodic_list_ctx*ctx,uint16_t _){ctx->_ret =gap_add_dev_to_periodic_list(ctx->addr_type,ctx->addr,ctx->sid);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_add_dev_to_periodic_list(const uint8_t addr_type,const uint8_t * addr,const uint8_t sid){if(IS_IN_HOST()){return gap_add_dev_to_periodic_list(addr_type,addr,sid);}else{struct gap_add_dev_to_periodic_list_ctx ctx = {._event = btstack_mt_event_alloc(),.addr_type = addr_type,.addr = addr,.sid = sid};CALL_USER_RET(gap_add_dev_to_periodic_list);}}
__attribute((weak)) uint8_t gap_rmv_dev_from_periodic_list(const uint8_t addr_type,const uint8_t * addr,const uint8_t sid) { return (uint8_t)0; }
struct gap_rmv_dev_from_periodic_list_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t addr_type;const uint8_t * addr;const uint8_t sid;};
static void gap_rmv_dev_from_periodic_list_0(struct gap_rmv_dev_from_periodic_list_ctx*ctx,uint16_t _){ctx->_ret =gap_rmv_dev_from_periodic_list(ctx->addr_type,ctx->addr,ctx->sid);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_rmv_dev_from_periodic_list(const uint8_t addr_type,const uint8_t * addr,const uint8_t sid){if(IS_IN_HOST()){return gap_rmv_dev_from_periodic_list(addr_type,addr,sid);}else{struct gap_rmv_dev_from_periodic_list_ctx ctx = {._event = btstack_mt_event_alloc(),.addr_type = addr_type,.addr = addr,.sid = sid};CALL_USER_RET(gap_rmv_dev_from_periodic_list);}}
__attribute((weak)) uint8_t gap_clr_periodic_adv_list() { return (uint8_t)0; }
struct gap_clr_periodic_adv_list_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_clr_periodic_adv_list_0(struct gap_clr_periodic_adv_list_ctx*ctx,uint16_t _){ctx->_ret =gap_clr_periodic_adv_list();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_clr_periodic_adv_list(){if(IS_IN_HOST()){return gap_clr_periodic_adv_list();}else{struct gap_clr_periodic_adv_list_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_clr_periodic_adv_list);}}
__attribute((weak)) uint8_t gap_read_periodic_adv_list_size() { return (uint8_t)0; }
struct gap_read_periodic_adv_list_size_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_read_periodic_adv_list_size_0(struct gap_read_periodic_adv_list_size_ctx*ctx,uint16_t _){ctx->_ret =gap_read_periodic_adv_list_size();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_periodic_adv_list_size(){if(IS_IN_HOST()){return gap_read_periodic_adv_list_size();}else{struct gap_read_periodic_adv_list_size_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_read_periodic_adv_list_size);}}
__attribute((weak)) uint8_t gap_ext_create_connection(const initiating_filter_policy_t filter_policy,const bd_addr_type_t own_addr_type,const bd_addr_type_t peer_addr_type,const uint8_t * peer_addr,const uint8_t initiating_phy_num,const initiating_phy_config_t * phy_configs) { return (uint8_t)0; }
struct gap_ext_create_connection_ctx {struct btstack_mt_event*_event;uint8_t _ret;const initiating_filter_policy_t filter_policy;const bd_addr_type_t own_addr_type;const bd_addr_type_t peer_addr_type;const uint8_t * peer_addr;const uint8_t initiating_phy_num;const initiating_phy_config_t * phy_configs;};
static void gap_ext_create_connection_0(struct gap_ext_create_connection_ctx*ctx,uint16_t _){ctx->_ret =gap_ext_create_connection(ctx->filter_policy,ctx->own_addr_type,ctx->peer_addr_type,ctx->peer_addr,ctx->initiating_phy_num,ctx->phy_configs);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_ext_create_connection(const initiating_filter_policy_t filter_policy,const bd_addr_type_t own_addr_type,const bd_addr_type_t peer_addr_type,const uint8_t * peer_addr,const uint8_t initiating_phy_num,const initiating_phy_config_t * phy_configs){if(IS_IN_HOST()){return gap_ext_create_connection(filter_policy,own_addr_type,peer_addr_type,peer_addr,initiating_phy_num,phy_configs);}else{struct gap_ext_create_connection_ctx ctx = {._event = btstack_mt_event_alloc(),.filter_policy = filter_policy,.own_addr_type = own_addr_type,.peer_addr_type = peer_addr_type,.peer_addr = peer_addr,.initiating_phy_num = initiating_phy_num,.phy_configs = phy_configs};CALL_USER_RET(gap_ext_create_connection);}}
__attribute((weak)) uint8_t gap_create_connection_cancel() { return (uint8_t)0; }
struct gap_create_connection_cancel_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_create_connection_cancel_0(struct gap_create_connection_cancel_ctx*ctx,uint16_t _){ctx->_ret =gap_create_connection_cancel();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_create_connection_cancel(){if(IS_IN_HOST()){return gap_create_connection_cancel();}else{struct gap_create_connection_cancel_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_create_connection_cancel);}}
__attribute((weak)) uint8_t gap_set_data_length(uint16_t connection_handle,uint16_t tx_octets,uint16_t tx_time) { return (uint8_t)0; }
struct gap_set_data_length_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint16_t connection_handle;uint16_t tx_octets;uint16_t tx_time;};
static void gap_set_data_length_0(struct gap_set_data_length_ctx*ctx,uint16_t _){ctx->_ret =gap_set_data_length(ctx->connection_handle,ctx->tx_octets,ctx->tx_time);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_data_length(uint16_t connection_handle,uint16_t tx_octets,uint16_t tx_time){if(IS_IN_HOST()){return gap_set_data_length(connection_handle,tx_octets,tx_time);}else{struct gap_set_data_length_ctx ctx = {._event = btstack_mt_event_alloc(),.connection_handle = connection_handle,.tx_octets = tx_octets,.tx_time = tx_time};CALL_USER_RET(gap_set_data_length);}}
__attribute((weak)) uint8_t gap_set_connectionless_cte_tx_param(const uint8_t adv_handle,const uint8_t cte_len,const cte_type_t cte_type,const uint8_t cte_count,const uint8_t switching_pattern_len,const uint8_t * antenna_ids) { return (uint8_t)0; }
struct gap_set_connectionless_cte_tx_param_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;const uint8_t cte_len;const cte_type_t cte_type;const uint8_t cte_count;const uint8_t switching_pattern_len;const uint8_t * antenna_ids;};
static void gap_set_connectionless_cte_tx_param_0(struct gap_set_connectionless_cte_tx_param_ctx*ctx,uint16_t _){ctx->_ret =gap_set_connectionless_cte_tx_param(ctx->adv_handle,ctx->cte_len,ctx->cte_type,ctx->cte_count,ctx->switching_pattern_len,ctx->antenna_ids);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_connectionless_cte_tx_param(const uint8_t adv_handle,const uint8_t cte_len,const cte_type_t cte_type,const uint8_t cte_count,const uint8_t switching_pattern_len,const uint8_t * antenna_ids){if(IS_IN_HOST()){return gap_set_connectionless_cte_tx_param(adv_handle,cte_len,cte_type,cte_count,switching_pattern_len,antenna_ids);}else{struct gap_set_connectionless_cte_tx_param_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.cte_len = cte_len,.cte_type = cte_type,.cte_count = cte_count,.switching_pattern_len = switching_pattern_len,.antenna_ids = antenna_ids};CALL_USER_RET(gap_set_connectionless_cte_tx_param);}}
__attribute((weak)) uint8_t gap_set_connectionless_cte_tx_enable(const uint8_t adv_handle,const uint8_t cte_enable) { return (uint8_t)0; }
struct gap_set_connectionless_cte_tx_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t adv_handle;const uint8_t cte_enable;};
static void gap_set_connectionless_cte_tx_enable_0(struct gap_set_connectionless_cte_tx_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_connectionless_cte_tx_enable(ctx->adv_handle,ctx->cte_enable);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_connectionless_cte_tx_enable(const uint8_t adv_handle,const uint8_t cte_enable){if(IS_IN_HOST()){return gap_set_connectionless_cte_tx_enable(adv_handle,cte_enable);}else{struct gap_set_connectionless_cte_tx_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.adv_handle = adv_handle,.cte_enable = cte_enable};CALL_USER_RET(gap_set_connectionless_cte_tx_enable);}}
__attribute((weak)) uint8_t gap_set_connectionless_iq_sampling_enable(const uint16_t sync_handle,const uint8_t sampling_enable,const cte_slot_duration_type_t slot_durations,const uint8_t max_sampled_ctes,const uint8_t switching_pattern_len,const uint8_t * antenna_ids) { return (uint8_t)0; }
struct gap_set_connectionless_iq_sampling_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint16_t sync_handle;const uint8_t sampling_enable;const cte_slot_duration_type_t slot_durations;const uint8_t max_sampled_ctes;const uint8_t switching_pattern_len;const uint8_t * antenna_ids;};
static void gap_set_connectionless_iq_sampling_enable_0(struct gap_set_connectionless_iq_sampling_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_connectionless_iq_sampling_enable(ctx->sync_handle,ctx->sampling_enable,ctx->slot_durations,ctx->max_sampled_ctes,ctx->switching_pattern_len,ctx->antenna_ids);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_connectionless_iq_sampling_enable(const uint16_t sync_handle,const uint8_t sampling_enable,const cte_slot_duration_type_t slot_durations,const uint8_t max_sampled_ctes,const uint8_t switching_pattern_len,const uint8_t * antenna_ids){if(IS_IN_HOST()){return gap_set_connectionless_iq_sampling_enable(sync_handle,sampling_enable,slot_durations,max_sampled_ctes,switching_pattern_len,antenna_ids);}else{struct gap_set_connectionless_iq_sampling_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.sync_handle = sync_handle,.sampling_enable = sampling_enable,.slot_durations = slot_durations,.max_sampled_ctes = max_sampled_ctes,.switching_pattern_len = switching_pattern_len,.antenna_ids = antenna_ids};CALL_USER_RET(gap_set_connectionless_iq_sampling_enable);}}
__attribute((weak)) uint8_t gap_set_connection_cte_rx_param(const hci_con_handle_t conn_handle,const uint8_t sampling_enable,const cte_slot_duration_type_t slot_durations,const uint8_t switching_pattern_len,const uint8_t * antenna_ids) { return (uint8_t)0; }
struct gap_set_connection_cte_rx_param_ctx {struct btstack_mt_event*_event;uint8_t _ret;const hci_con_handle_t conn_handle;const uint8_t sampling_enable;const cte_slot_duration_type_t slot_durations;const uint8_t switching_pattern_len;const uint8_t * antenna_ids;};
static void gap_set_connection_cte_rx_param_0(struct gap_set_connection_cte_rx_param_ctx*ctx,uint16_t _){ctx->_ret =gap_set_connection_cte_rx_param(ctx->conn_handle,ctx->sampling_enable,ctx->slot_durations,ctx->switching_pattern_len,ctx->antenna_ids);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_connection_cte_rx_param(const hci_con_handle_t conn_handle,const uint8_t sampling_enable,const cte_slot_duration_type_t slot_durations,const uint8_t switching_pattern_len,const uint8_t * antenna_ids){if(IS_IN_HOST()){return gap_set_connection_cte_rx_param(conn_handle,sampling_enable,slot_durations,switching_pattern_len,antenna_ids);}else{struct gap_set_connection_cte_rx_param_ctx ctx = {._event = btstack_mt_event_alloc(),.conn_handle = conn_handle,.sampling_enable = sampling_enable,.slot_durations = slot_durations,.switching_pattern_len = switching_pattern_len,.antenna_ids = antenna_ids};CALL_USER_RET(gap_set_connection_cte_rx_param);}}
__attribute((weak)) uint8_t gap_set_connection_cte_tx_param(const hci_con_handle_t conn_handle,const uint8_t cte_types,const uint8_t switching_pattern_len,const uint8_t * antenna_ids) { return (uint8_t)0; }
struct gap_set_connection_cte_tx_param_ctx {struct btstack_mt_event*_event;uint8_t _ret;const hci_con_handle_t conn_handle;const uint8_t cte_types;const uint8_t switching_pattern_len;const uint8_t * antenna_ids;};
static void gap_set_connection_cte_tx_param_0(struct gap_set_connection_cte_tx_param_ctx*ctx,uint16_t _){ctx->_ret =gap_set_connection_cte_tx_param(ctx->conn_handle,ctx->cte_types,ctx->switching_pattern_len,ctx->antenna_ids);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_connection_cte_tx_param(const hci_con_handle_t conn_handle,const uint8_t cte_types,const uint8_t switching_pattern_len,const uint8_t * antenna_ids){if(IS_IN_HOST()){return gap_set_connection_cte_tx_param(conn_handle,cte_types,switching_pattern_len,antenna_ids);}else{struct gap_set_connection_cte_tx_param_ctx ctx = {._event = btstack_mt_event_alloc(),.conn_handle = conn_handle,.cte_types = cte_types,.switching_pattern_len = switching_pattern_len,.antenna_ids = antenna_ids};CALL_USER_RET(gap_set_connection_cte_tx_param);}}
__attribute((weak)) uint8_t gap_set_connection_cte_request_enable(const hci_con_handle_t conn_handle,const uint8_t enable,const uint16_t requested_cte_interval,const uint8_t requested_cte_length,const cte_type_t requested_cte_type) { return (uint8_t)0; }
struct gap_set_connection_cte_request_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const hci_con_handle_t conn_handle;const uint8_t enable;const uint16_t requested_cte_interval;const uint8_t requested_cte_length;const cte_type_t requested_cte_type;};
static void gap_set_connection_cte_request_enable_0(struct gap_set_connection_cte_request_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_connection_cte_request_enable(ctx->conn_handle,ctx->enable,ctx->requested_cte_interval,ctx->requested_cte_length,ctx->requested_cte_type);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_connection_cte_request_enable(const hci_con_handle_t conn_handle,const uint8_t enable,const uint16_t requested_cte_interval,const uint8_t requested_cte_length,const cte_type_t requested_cte_type){if(IS_IN_HOST()){return gap_set_connection_cte_request_enable(conn_handle,enable,requested_cte_interval,requested_cte_length,requested_cte_type);}else{struct gap_set_connection_cte_request_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.conn_handle = conn_handle,.enable = enable,.requested_cte_interval = requested_cte_interval,.requested_cte_length = requested_cte_length,.requested_cte_type = requested_cte_type};CALL_USER_RET(gap_set_connection_cte_request_enable);}}
__attribute((weak)) uint8_t gap_set_connection_cte_response_enable(const hci_con_handle_t conn_handle,const uint8_t enable) { return (uint8_t)0; }
struct gap_set_connection_cte_response_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const hci_con_handle_t conn_handle;const uint8_t enable;};
static void gap_set_connection_cte_response_enable_0(struct gap_set_connection_cte_response_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_connection_cte_response_enable(ctx->conn_handle,ctx->enable);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_connection_cte_response_enable(const hci_con_handle_t conn_handle,const uint8_t enable){if(IS_IN_HOST()){return gap_set_connection_cte_response_enable(conn_handle,enable);}else{struct gap_set_connection_cte_response_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.conn_handle = conn_handle,.enable = enable};CALL_USER_RET(gap_set_connection_cte_response_enable);}}
__attribute((weak)) uint8_t gap_read_antenna_info() { return (uint8_t)0; }
struct gap_read_antenna_info_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_read_antenna_info_0(struct gap_read_antenna_info_ctx*ctx,uint16_t _){ctx->_ret =gap_read_antenna_info();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_antenna_info(){if(IS_IN_HOST()){return gap_read_antenna_info();}else{struct gap_read_antenna_info_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_read_antenna_info);}}
__attribute((weak)) uint8_t gap_set_periodic_adv_rx_enable(const uint16_t sync_handle,const uint8_t enable) { return (uint8_t)0; }
struct gap_set_periodic_adv_rx_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint16_t sync_handle;const uint8_t enable;};
static void gap_set_periodic_adv_rx_enable_0(struct gap_set_periodic_adv_rx_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_periodic_adv_rx_enable(ctx->sync_handle,ctx->enable);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_periodic_adv_rx_enable(const uint16_t sync_handle,const uint8_t enable){if(IS_IN_HOST()){return gap_set_periodic_adv_rx_enable(sync_handle,enable);}else{struct gap_set_periodic_adv_rx_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.sync_handle = sync_handle,.enable = enable};CALL_USER_RET(gap_set_periodic_adv_rx_enable);}}
__attribute((weak)) uint8_t gap_periodic_adv_sync_transfer(const hci_con_handle_t conn_handle,const uint16_t service_data,const uint16_t sync_handle) { return (uint8_t)0; }
struct gap_periodic_adv_sync_transfer_ctx {struct btstack_mt_event*_event;uint8_t _ret;const hci_con_handle_t conn_handle;const uint16_t service_data;const uint16_t sync_handle;};
static void gap_periodic_adv_sync_transfer_0(struct gap_periodic_adv_sync_transfer_ctx*ctx,uint16_t _){ctx->_ret =gap_periodic_adv_sync_transfer(ctx->conn_handle,ctx->service_data,ctx->sync_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_periodic_adv_sync_transfer(const hci_con_handle_t conn_handle,const uint16_t service_data,const uint16_t sync_handle){if(IS_IN_HOST()){return gap_periodic_adv_sync_transfer(conn_handle,service_data,sync_handle);}else{struct gap_periodic_adv_sync_transfer_ctx ctx = {._event = btstack_mt_event_alloc(),.conn_handle = conn_handle,.service_data = service_data,.sync_handle = sync_handle};CALL_USER_RET(gap_periodic_adv_sync_transfer);}}
__attribute((weak)) uint8_t gap_periodic_adv_set_info_transfer(const hci_con_handle_t conn_handle,const uint16_t service_data,const uint8_t adv_handle) { return (uint8_t)0; }
struct gap_periodic_adv_set_info_transfer_ctx {struct btstack_mt_event*_event;uint8_t _ret;const hci_con_handle_t conn_handle;const uint16_t service_data;const uint8_t adv_handle;};
static void gap_periodic_adv_set_info_transfer_0(struct gap_periodic_adv_set_info_transfer_ctx*ctx,uint16_t _){ctx->_ret =gap_periodic_adv_set_info_transfer(ctx->conn_handle,ctx->service_data,ctx->adv_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_periodic_adv_set_info_transfer(const hci_con_handle_t conn_handle,const uint16_t service_data,const uint8_t adv_handle){if(IS_IN_HOST()){return gap_periodic_adv_set_info_transfer(conn_handle,service_data,adv_handle);}else{struct gap_periodic_adv_set_info_transfer_ctx ctx = {._event = btstack_mt_event_alloc(),.conn_handle = conn_handle,.service_data = service_data,.adv_handle = adv_handle};CALL_USER_RET(gap_periodic_adv_set_info_transfer);}}
__attribute((weak)) uint8_t gap_periodic_adv_sync_transfer_param(const hci_con_handle_t conn_handle,const periodic_adv_sync_transfer_mode_t mode,const uint16_t skip,const uint16_t sync_timeout,const uint8_t cte_excl_types) { return (uint8_t)0; }
struct gap_periodic_adv_sync_transfer_param_ctx {struct btstack_mt_event*_event;uint8_t _ret;const hci_con_handle_t conn_handle;const periodic_adv_sync_transfer_mode_t mode;const uint16_t skip;const uint16_t sync_timeout;const uint8_t cte_excl_types;};
static void gap_periodic_adv_sync_transfer_param_0(struct gap_periodic_adv_sync_transfer_param_ctx*ctx,uint16_t _){ctx->_ret =gap_periodic_adv_sync_transfer_param(ctx->conn_handle,ctx->mode,ctx->skip,ctx->sync_timeout,ctx->cte_excl_types);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_periodic_adv_sync_transfer_param(const hci_con_handle_t conn_handle,const periodic_adv_sync_transfer_mode_t mode,const uint16_t skip,const uint16_t sync_timeout,const uint8_t cte_excl_types){if(IS_IN_HOST()){return gap_periodic_adv_sync_transfer_param(conn_handle,mode,skip,sync_timeout,cte_excl_types);}else{struct gap_periodic_adv_sync_transfer_param_ctx ctx = {._event = btstack_mt_event_alloc(),.conn_handle = conn_handle,.mode = mode,.skip = skip,.sync_timeout = sync_timeout,.cte_excl_types = cte_excl_types};CALL_USER_RET(gap_periodic_adv_sync_transfer_param);}}
__attribute((weak)) uint8_t gap_default_periodic_adv_sync_transfer_param(const periodic_adv_sync_transfer_mode_t mode,const uint16_t skip,const uint16_t sync_timeout,const uint8_t cte_excl_types) { return (uint8_t)0; }
struct gap_default_periodic_adv_sync_transfer_param_ctx {struct btstack_mt_event*_event;uint8_t _ret;const periodic_adv_sync_transfer_mode_t mode;const uint16_t skip;const uint16_t sync_timeout;const uint8_t cte_excl_types;};
static void gap_default_periodic_adv_sync_transfer_param_0(struct gap_default_periodic_adv_sync_transfer_param_ctx*ctx,uint16_t _){ctx->_ret =gap_default_periodic_adv_sync_transfer_param(ctx->mode,ctx->skip,ctx->sync_timeout,ctx->cte_excl_types);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_default_periodic_adv_sync_transfer_param(const periodic_adv_sync_transfer_mode_t mode,const uint16_t skip,const uint16_t sync_timeout,const uint8_t cte_excl_types){if(IS_IN_HOST()){return gap_default_periodic_adv_sync_transfer_param(mode,skip,sync_timeout,cte_excl_types);}else{struct gap_default_periodic_adv_sync_transfer_param_ctx ctx = {._event = btstack_mt_event_alloc(),.mode = mode,.skip = skip,.sync_timeout = sync_timeout,.cte_excl_types = cte_excl_types};CALL_USER_RET(gap_default_periodic_adv_sync_transfer_param);}}
__attribute((weak)) uint8_t gap_set_host_channel_classification(const uint32_t channel_low,const uint8_t channel_high) { return (uint8_t)0; }
struct gap_set_host_channel_classification_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint32_t channel_low;const uint8_t channel_high;};
static void gap_set_host_channel_classification_0(struct gap_set_host_channel_classification_ctx*ctx,uint16_t _){ctx->_ret =gap_set_host_channel_classification(ctx->channel_low,ctx->channel_high);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_host_channel_classification(const uint32_t channel_low,const uint8_t channel_high){if(IS_IN_HOST()){return gap_set_host_channel_classification(channel_low,channel_high);}else{struct gap_set_host_channel_classification_ctx ctx = {._event = btstack_mt_event_alloc(),.channel_low = channel_low,.channel_high = channel_high};CALL_USER_RET(gap_set_host_channel_classification);}}
__attribute((weak)) int gap_update_connection_parameters(hci_con_handle_t con_handle,uint16_t conn_interval_min,uint16_t conn_interval_max,uint16_t conn_latency,uint16_t supervision_timeout,uint16_t min_ce_len,uint16_t max_ce_len) { return (int)0; }
struct gap_update_connection_parameters_ctx {struct btstack_mt_event*_event;int _ret;hci_con_handle_t con_handle;uint16_t conn_interval_min;uint16_t conn_interval_max;uint16_t conn_latency;uint16_t supervision_timeout;uint16_t min_ce_len;uint16_t max_ce_len;};
static void gap_update_connection_parameters_0(struct gap_update_connection_parameters_ctx*ctx,uint16_t _){ctx->_ret =gap_update_connection_parameters(ctx->con_handle,ctx->conn_interval_min,ctx->conn_interval_max,ctx->conn_latency,ctx->supervision_timeout,ctx->min_ce_len,ctx->max_ce_len);btstack_mt_event_set(ctx->_event);}
int mt_gap_update_connection_parameters(hci_con_handle_t con_handle,uint16_t conn_interval_min,uint16_t conn_interval_max,uint16_t conn_latency,uint16_t supervision_timeout,uint16_t min_ce_len,uint16_t max_ce_len){if(IS_IN_HOST()){return gap_update_connection_parameters(con_handle,conn_interval_min,conn_interval_max,conn_latency,supervision_timeout,min_ce_len,max_ce_len);}else{struct gap_update_connection_parameters_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.conn_interval_min = conn_interval_min,.conn_interval_max = conn_interval_max,.conn_latency = conn_latency,.supervision_timeout = supervision_timeout,.min_ce_len = min_ce_len,.max_ce_len = max_ce_len};CALL_USER_RET(gap_update_connection_parameters);}}
__attribute((weak)) void gap_get_connection_parameter_range(le_connection_parameter_range_t * range) { }
struct gap_get_connection_parameter_range_ctx {struct btstack_mt_event*_event;le_connection_parameter_range_t * range;};
static void gap_get_connection_parameter_range_0(struct gap_get_connection_parameter_range_ctx*ctx,uint16_t _){gap_get_connection_parameter_range(ctx->range);btstack_mt_event_set(ctx->_event);}
void mt_gap_get_connection_parameter_range(le_connection_parameter_range_t * range){if(IS_IN_HOST()){gap_get_connection_parameter_range(range);}else{struct gap_get_connection_parameter_range_ctx ctx = {._event = btstack_mt_event_alloc(),.range = range};CALL_USER_VOID(gap_get_connection_parameter_range);}}
__attribute((weak)) void gap_set_connection_parameter_range(le_connection_parameter_range_t * range) { }
struct gap_set_connection_parameter_range_ctx {struct btstack_mt_event*_event;le_connection_parameter_range_t * range;};
static void gap_set_connection_parameter_range_0(struct gap_set_connection_parameter_range_ctx*ctx,uint16_t _){gap_set_connection_parameter_range(ctx->range);btstack_mt_event_set(ctx->_event);}
void mt_gap_set_connection_parameter_range(le_connection_parameter_range_t * range){if(IS_IN_HOST()){gap_set_connection_parameter_range(range);}else{struct gap_set_connection_parameter_range_ctx ctx = {._event = btstack_mt_event_alloc(),.range = range};CALL_USER_VOID(gap_set_connection_parameter_range);}}
__attribute((weak)) uint8_t gap_read_local_tx_power_level(hci_con_handle_t con_handle,unified_phy_type_t phy) { return (uint8_t)0; }
struct gap_read_local_tx_power_level_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;unified_phy_type_t phy;};
static void gap_read_local_tx_power_level_0(struct gap_read_local_tx_power_level_ctx*ctx,uint16_t _){ctx->_ret =gap_read_local_tx_power_level(ctx->con_handle,ctx->phy);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_local_tx_power_level(hci_con_handle_t con_handle,unified_phy_type_t phy){if(IS_IN_HOST()){return gap_read_local_tx_power_level(con_handle,phy);}else{struct gap_read_local_tx_power_level_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.phy = phy};CALL_USER_RET(gap_read_local_tx_power_level);}}
__attribute((weak)) uint8_t gap_read_remote_tx_power_level(hci_con_handle_t con_handle,unified_phy_type_t phy) { return (uint8_t)0; }
struct gap_read_remote_tx_power_level_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;unified_phy_type_t phy;};
static void gap_read_remote_tx_power_level_0(struct gap_read_remote_tx_power_level_ctx*ctx,uint16_t _){ctx->_ret =gap_read_remote_tx_power_level(ctx->con_handle,ctx->phy);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_read_remote_tx_power_level(hci_con_handle_t con_handle,unified_phy_type_t phy){if(IS_IN_HOST()){return gap_read_remote_tx_power_level(con_handle,phy);}else{struct gap_read_remote_tx_power_level_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.phy = phy};CALL_USER_RET(gap_read_remote_tx_power_level);}}
__attribute((weak)) uint8_t gap_set_path_loss_reporting_param(hci_con_handle_t con_handle,uint8_t high_threshold,uint8_t high_hysteresis,uint8_t low_threshold,uint8_t low_hysteresis,uint8_t min_time_spent) { return (uint8_t)0; }
struct gap_set_path_loss_reporting_param_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;uint8_t high_threshold;uint8_t high_hysteresis;uint8_t low_threshold;uint8_t low_hysteresis;uint8_t min_time_spent;};
static void gap_set_path_loss_reporting_param_0(struct gap_set_path_loss_reporting_param_ctx*ctx,uint16_t _){ctx->_ret =gap_set_path_loss_reporting_param(ctx->con_handle,ctx->high_threshold,ctx->high_hysteresis,ctx->low_threshold,ctx->low_hysteresis,ctx->min_time_spent);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_path_loss_reporting_param(hci_con_handle_t con_handle,uint8_t high_threshold,uint8_t high_hysteresis,uint8_t low_threshold,uint8_t low_hysteresis,uint8_t min_time_spent){if(IS_IN_HOST()){return gap_set_path_loss_reporting_param(con_handle,high_threshold,high_hysteresis,low_threshold,low_hysteresis,min_time_spent);}else{struct gap_set_path_loss_reporting_param_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.high_threshold = high_threshold,.high_hysteresis = high_hysteresis,.low_threshold = low_threshold,.low_hysteresis = low_hysteresis,.min_time_spent = min_time_spent};CALL_USER_RET(gap_set_path_loss_reporting_param);}}
__attribute((weak)) uint8_t gap_set_path_loss_reporting_enable(hci_con_handle_t con_handle,uint8_t enable) { return (uint8_t)0; }
struct gap_set_path_loss_reporting_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;uint8_t enable;};
static void gap_set_path_loss_reporting_enable_0(struct gap_set_path_loss_reporting_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_path_loss_reporting_enable(ctx->con_handle,ctx->enable);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_path_loss_reporting_enable(hci_con_handle_t con_handle,uint8_t enable){if(IS_IN_HOST()){return gap_set_path_loss_reporting_enable(con_handle,enable);}else{struct gap_set_path_loss_reporting_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.enable = enable};CALL_USER_RET(gap_set_path_loss_reporting_enable);}}
__attribute((weak)) uint8_t gap_set_tx_power_reporting_enable(hci_con_handle_t con_handle,uint8_t local_enable,uint8_t remote_enable) { return (uint8_t)0; }
struct gap_set_tx_power_reporting_enable_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;uint8_t local_enable;uint8_t remote_enable;};
static void gap_set_tx_power_reporting_enable_0(struct gap_set_tx_power_reporting_enable_ctx*ctx,uint16_t _){ctx->_ret =gap_set_tx_power_reporting_enable(ctx->con_handle,ctx->local_enable,ctx->remote_enable);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_tx_power_reporting_enable(hci_con_handle_t con_handle,uint8_t local_enable,uint8_t remote_enable){if(IS_IN_HOST()){return gap_set_tx_power_reporting_enable(con_handle,local_enable,remote_enable);}else{struct gap_set_tx_power_reporting_enable_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.local_enable = local_enable,.remote_enable = remote_enable};CALL_USER_RET(gap_set_tx_power_reporting_enable);}}
__attribute((weak)) uint8_t gap_set_default_subrate(uint16_t subrate_min,uint16_t subrate_max,uint16_t max_latency,uint16_t continuation_number,uint16_t supervision_timeout) { return (uint8_t)0; }
struct gap_set_default_subrate_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint16_t subrate_min;uint16_t subrate_max;uint16_t max_latency;uint16_t continuation_number;uint16_t supervision_timeout;};
static void gap_set_default_subrate_0(struct gap_set_default_subrate_ctx*ctx,uint16_t _){ctx->_ret =gap_set_default_subrate(ctx->subrate_min,ctx->subrate_max,ctx->max_latency,ctx->continuation_number,ctx->supervision_timeout);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_set_default_subrate(uint16_t subrate_min,uint16_t subrate_max,uint16_t max_latency,uint16_t continuation_number,uint16_t supervision_timeout){if(IS_IN_HOST()){return gap_set_default_subrate(subrate_min,subrate_max,max_latency,continuation_number,supervision_timeout);}else{struct gap_set_default_subrate_ctx ctx = {._event = btstack_mt_event_alloc(),.subrate_min = subrate_min,.subrate_max = subrate_max,.max_latency = max_latency,.continuation_number = continuation_number,.supervision_timeout = supervision_timeout};CALL_USER_RET(gap_set_default_subrate);}}
__attribute((weak)) uint8_t gap_subrate_request(hci_con_handle_t con_handle,uint16_t subrate_min,uint16_t subrate_max,uint16_t max_latency,uint16_t continuation_number,uint16_t supervision_timeout) { return (uint8_t)0; }
struct gap_subrate_request_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;uint16_t subrate_min;uint16_t subrate_max;uint16_t max_latency;uint16_t continuation_number;uint16_t supervision_timeout;};
static void gap_subrate_request_0(struct gap_subrate_request_ctx*ctx,uint16_t _){ctx->_ret =gap_subrate_request(ctx->con_handle,ctx->subrate_min,ctx->subrate_max,ctx->max_latency,ctx->continuation_number,ctx->supervision_timeout);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_subrate_request(hci_con_handle_t con_handle,uint16_t subrate_min,uint16_t subrate_max,uint16_t max_latency,uint16_t continuation_number,uint16_t supervision_timeout){if(IS_IN_HOST()){return gap_subrate_request(con_handle,subrate_min,subrate_max,max_latency,continuation_number,supervision_timeout);}else{struct gap_subrate_request_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.subrate_min = subrate_min,.subrate_max = subrate_max,.max_latency = max_latency,.continuation_number = continuation_number,.supervision_timeout = supervision_timeout};CALL_USER_RET(gap_subrate_request);}}
__attribute((weak)) uint8_t gap_aes_encrypt(const uint8_t * key,const uint8_t * plaintext,gap_hci_cmd_complete_cb_t cb,void * user_data) { return (uint8_t)0; }
struct gap_aes_encrypt_ctx {struct btstack_mt_event*_event;uint8_t _ret;const uint8_t * key;const uint8_t * plaintext;gap_hci_cmd_complete_cb_t cb;void * user_data;};
static void gap_aes_encrypt_0(struct gap_aes_encrypt_ctx*ctx,uint16_t _){ctx->_ret =gap_aes_encrypt(ctx->key,ctx->plaintext,ctx->cb,ctx->user_data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_aes_encrypt(const uint8_t * key,const uint8_t * plaintext,gap_hci_cmd_complete_cb_t cb,void * user_data){if(IS_IN_HOST()){return gap_aes_encrypt(key,plaintext,cb,user_data);}else{struct gap_aes_encrypt_ctx ctx = {._event = btstack_mt_event_alloc(),.key = key,.plaintext = plaintext,.cb = cb,.user_data = user_data};CALL_USER_RET(gap_aes_encrypt);}}
__attribute((weak)) uint8_t gap_rx_test_v2(uint8_t rx_channel,uint8_t phy,uint8_t modulation_index) { return (uint8_t)0; }
struct gap_rx_test_v2_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint8_t rx_channel;uint8_t phy;uint8_t modulation_index;};
static void gap_rx_test_v2_0(struct gap_rx_test_v2_ctx*ctx,uint16_t _){ctx->_ret =gap_rx_test_v2(ctx->rx_channel,ctx->phy,ctx->modulation_index);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_rx_test_v2(uint8_t rx_channel,uint8_t phy,uint8_t modulation_index){if(IS_IN_HOST()){return gap_rx_test_v2(rx_channel,phy,modulation_index);}else{struct gap_rx_test_v2_ctx ctx = {._event = btstack_mt_event_alloc(),.rx_channel = rx_channel,.phy = phy,.modulation_index = modulation_index};CALL_USER_RET(gap_rx_test_v2);}}
__attribute((weak)) uint8_t gap_rx_test_v3(uint8_t rx_channel,uint8_t phy,uint8_t modulation_index,uint8_t expected_cte_length,uint8_t expected_cte_type,uint8_t slot_durations,uint8_t switching_pattern_length,uint8_t * antenna_ids) { return (uint8_t)0; }
struct gap_rx_test_v3_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint8_t rx_channel;uint8_t phy;uint8_t modulation_index;uint8_t expected_cte_length;uint8_t expected_cte_type;uint8_t slot_durations;uint8_t switching_pattern_length;uint8_t * antenna_ids;};
static void gap_rx_test_v3_0(struct gap_rx_test_v3_ctx*ctx,uint16_t _){ctx->_ret =gap_rx_test_v3(ctx->rx_channel,ctx->phy,ctx->modulation_index,ctx->expected_cte_length,ctx->expected_cte_type,ctx->slot_durations,ctx->switching_pattern_length,ctx->antenna_ids);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_rx_test_v3(uint8_t rx_channel,uint8_t phy,uint8_t modulation_index,uint8_t expected_cte_length,uint8_t expected_cte_type,uint8_t slot_durations,uint8_t switching_pattern_length,uint8_t * antenna_ids){if(IS_IN_HOST()){return gap_rx_test_v3(rx_channel,phy,modulation_index,expected_cte_length,expected_cte_type,slot_durations,switching_pattern_length,antenna_ids);}else{struct gap_rx_test_v3_ctx ctx = {._event = btstack_mt_event_alloc(),.rx_channel = rx_channel,.phy = phy,.modulation_index = modulation_index,.expected_cte_length = expected_cte_length,.expected_cte_type = expected_cte_type,.slot_durations = slot_durations,.switching_pattern_length = switching_pattern_length,.antenna_ids = antenna_ids};CALL_USER_RET(gap_rx_test_v3);}}
__attribute((weak)) uint8_t gap_tx_test_v2(uint8_t tx_channel,uint8_t test_data_length,uint8_t packet_payload,uint8_t phy) { return (uint8_t)0; }
struct gap_tx_test_v2_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint8_t tx_channel;uint8_t test_data_length;uint8_t packet_payload;uint8_t phy;};
static void gap_tx_test_v2_0(struct gap_tx_test_v2_ctx*ctx,uint16_t _){ctx->_ret =gap_tx_test_v2(ctx->tx_channel,ctx->test_data_length,ctx->packet_payload,ctx->phy);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_tx_test_v2(uint8_t tx_channel,uint8_t test_data_length,uint8_t packet_payload,uint8_t phy){if(IS_IN_HOST()){return gap_tx_test_v2(tx_channel,test_data_length,packet_payload,phy);}else{struct gap_tx_test_v2_ctx ctx = {._event = btstack_mt_event_alloc(),.tx_channel = tx_channel,.test_data_length = test_data_length,.packet_payload = packet_payload,.phy = phy};CALL_USER_RET(gap_tx_test_v2);}}
__attribute((weak)) uint8_t gap_tx_test_v4(uint8_t tx_channel,uint8_t test_data_length,uint8_t packet_payload,uint8_t phy,uint8_t cte_length,uint8_t cte_type,uint8_t switching_pattern_length,uint8_t * antenna_ids,int8_t tx_power_level) { return (uint8_t)0; }
struct gap_tx_test_v4_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint8_t tx_channel;uint8_t test_data_length;uint8_t packet_payload;uint8_t phy;uint8_t cte_length;uint8_t cte_type;uint8_t switching_pattern_length;uint8_t * antenna_ids;int8_t tx_power_level;};
static void gap_tx_test_v4_0(struct gap_tx_test_v4_ctx*ctx,uint16_t _){ctx->_ret =gap_tx_test_v4(ctx->tx_channel,ctx->test_data_length,ctx->packet_payload,ctx->phy,ctx->cte_length,ctx->cte_type,ctx->switching_pattern_length,ctx->antenna_ids,ctx->tx_power_level);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_tx_test_v4(uint8_t tx_channel,uint8_t test_data_length,uint8_t packet_payload,uint8_t phy,uint8_t cte_length,uint8_t cte_type,uint8_t switching_pattern_length,uint8_t * antenna_ids,int8_t tx_power_level){if(IS_IN_HOST()){return gap_tx_test_v4(tx_channel,test_data_length,packet_payload,phy,cte_length,cte_type,switching_pattern_length,antenna_ids,tx_power_level);}else{struct gap_tx_test_v4_ctx ctx = {._event = btstack_mt_event_alloc(),.tx_channel = tx_channel,.test_data_length = test_data_length,.packet_payload = packet_payload,.phy = phy,.cte_length = cte_length,.cte_type = cte_type,.switching_pattern_length = switching_pattern_length,.antenna_ids = antenna_ids,.tx_power_level = tx_power_level};CALL_USER_RET(gap_tx_test_v4);}}
__attribute((weak)) uint8_t gap_test_end() { return (uint8_t)0; }
struct gap_test_end_ctx {struct btstack_mt_event*_event;uint8_t _ret;};
static void gap_test_end_0(struct gap_test_end_ctx*ctx,uint16_t _){ctx->_ret =gap_test_end();btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_test_end(){if(IS_IN_HOST()){return gap_test_end();}else{struct gap_test_end_ctx ctx = {._event = btstack_mt_event_alloc(),};CALL_USER_RET(gap_test_end);}}
__attribute((weak)) uint8_t gap_vendor_tx_continuous_wave(uint8_t enable,uint8_t power_level_index,uint16_t freq) { return (uint8_t)0; }
struct gap_vendor_tx_continuous_wave_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint8_t enable;uint8_t power_level_index;uint16_t freq;};
static void gap_vendor_tx_continuous_wave_0(struct gap_vendor_tx_continuous_wave_ctx*ctx,uint16_t _){ctx->_ret =gap_vendor_tx_continuous_wave(ctx->enable,ctx->power_level_index,ctx->freq);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_vendor_tx_continuous_wave(uint8_t enable,uint8_t power_level_index,uint16_t freq){if(IS_IN_HOST()){return gap_vendor_tx_continuous_wave(enable,power_level_index,freq);}else{struct gap_vendor_tx_continuous_wave_ctx ctx = {._event = btstack_mt_event_alloc(),.enable = enable,.power_level_index = power_level_index,.freq = freq};CALL_USER_RET(gap_vendor_tx_continuous_wave);}}
__attribute((weak)) uint8_t gap_start_ccm(uint8_t type,uint8_t mic_size,uint16_t msg_len,uint16_t aad_len,uint32_t tag,const uint8_t * key,const uint8_t * nonce,const uint8_t * msg,const uint8_t * aad,uint8_t * out_msg,gap_hci_cmd_complete_cb_t cb,void * user_data) { return (uint8_t)0; }
struct gap_start_ccm_ctx {struct btstack_mt_event*_event;uint8_t _ret;uint8_t type;uint8_t mic_size;uint16_t msg_len;uint16_t aad_len;uint32_t tag;const uint8_t * key;const uint8_t * nonce;const uint8_t * msg;const uint8_t * aad;uint8_t * out_msg;gap_hci_cmd_complete_cb_t cb;void * user_data;};
static void gap_start_ccm_0(struct gap_start_ccm_ctx*ctx,uint16_t _){ctx->_ret =gap_start_ccm(ctx->type,ctx->mic_size,ctx->msg_len,ctx->aad_len,ctx->tag,ctx->key,ctx->nonce,ctx->msg,ctx->aad,ctx->out_msg,ctx->cb,ctx->user_data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gap_start_ccm(uint8_t type,uint8_t mic_size,uint16_t msg_len,uint16_t aad_len,uint32_t tag,const uint8_t * key,const uint8_t * nonce,const uint8_t * msg,const uint8_t * aad,uint8_t * out_msg,gap_hci_cmd_complete_cb_t cb,void * user_data){if(IS_IN_HOST()){return gap_start_ccm(type,mic_size,msg_len,aad_len,tag,key,nonce,msg,aad,out_msg,cb,user_data);}else{struct gap_start_ccm_ctx ctx = {._event = btstack_mt_event_alloc(),.type = type,.mic_size = mic_size,.msg_len = msg_len,.aad_len = aad_len,.tag = tag,.key = key,.nonce = nonce,.msg = msg,.aad = aad,.out_msg = out_msg,.cb = cb,.user_data = user_data};CALL_USER_RET(gap_start_ccm);}}
__attribute((weak)) int att_server_deferred_read_response(hci_con_handle_t con_handle,uint16_t attribute_handle,const uint8_t * value,uint16_t value_len) { return (int)0; }
struct att_server_deferred_read_response_ctx {struct btstack_mt_event*_event;int _ret;hci_con_handle_t con_handle;uint16_t attribute_handle;const uint8_t * value;uint16_t value_len;};
static void att_server_deferred_read_response_0(struct att_server_deferred_read_response_ctx*ctx,uint16_t _){ctx->_ret =att_server_deferred_read_response(ctx->con_handle,ctx->attribute_handle,ctx->value,ctx->value_len);btstack_mt_event_set(ctx->_event);}
int mt_att_server_deferred_read_response(hci_con_handle_t con_handle,uint16_t attribute_handle,const uint8_t * value,uint16_t value_len){if(IS_IN_HOST()){return att_server_deferred_read_response(con_handle,attribute_handle,value,value_len);}else{struct att_server_deferred_read_response_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.attribute_handle = attribute_handle,.value = value,.value_len = value_len};CALL_USER_RET(att_server_deferred_read_response);}}
__attribute((weak)) int att_server_notify(hci_con_handle_t con_handle,uint16_t attribute_handle,uint8_t * value,uint16_t value_len) { return (int)0; }
struct att_server_notify_ctx {struct btstack_mt_event*_event;int _ret;hci_con_handle_t con_handle;uint16_t attribute_handle;uint8_t * value;uint16_t value_len;};
static void att_server_notify_0(struct att_server_notify_ctx*ctx,uint16_t _){ctx->_ret =att_server_notify(ctx->con_handle,ctx->attribute_handle,ctx->value,ctx->value_len);btstack_mt_event_set(ctx->_event);}
int mt_att_server_notify(hci_con_handle_t con_handle,uint16_t attribute_handle,uint8_t * value,uint16_t value_len){if(IS_IN_HOST()){return att_server_notify(con_handle,attribute_handle,value,value_len);}else{struct att_server_notify_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.attribute_handle = attribute_handle,.value = value,.value_len = value_len};CALL_USER_RET(att_server_notify);}}
__attribute((weak)) int att_server_indicate(hci_con_handle_t con_handle,uint16_t attribute_handle,uint8_t * value,uint16_t value_len) { return (int)0; }
struct att_server_indicate_ctx {struct btstack_mt_event*_event;int _ret;hci_con_handle_t con_handle;uint16_t attribute_handle;uint8_t * value;uint16_t value_len;};
static void att_server_indicate_0(struct att_server_indicate_ctx*ctx,uint16_t _){ctx->_ret =att_server_indicate(ctx->con_handle,ctx->attribute_handle,ctx->value,ctx->value_len);btstack_mt_event_set(ctx->_event);}
int mt_att_server_indicate(hci_con_handle_t con_handle,uint16_t attribute_handle,uint8_t * value,uint16_t value_len){if(IS_IN_HOST()){return att_server_indicate(con_handle,attribute_handle,value,value_len);}else{struct att_server_indicate_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.attribute_handle = attribute_handle,.value = value,.value_len = value_len};CALL_USER_RET(att_server_indicate);}}
__attribute((weak)) uint16_t att_server_get_mtu(hci_con_handle_t con_handle) { return (uint16_t)0; }
struct att_server_get_mtu_ctx {struct btstack_mt_event*_event;uint16_t _ret;hci_con_handle_t con_handle;};
static void att_server_get_mtu_0(struct att_server_get_mtu_ctx*ctx,uint16_t _){ctx->_ret =att_server_get_mtu(ctx->con_handle);btstack_mt_event_set(ctx->_event);}
uint16_t mt_att_server_get_mtu(hci_con_handle_t con_handle){if(IS_IN_HOST()){return att_server_get_mtu(con_handle);}else{struct att_server_get_mtu_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle};CALL_USER_RET(att_server_get_mtu);}}
__attribute((weak)) uint8_t gatt_client_discover_primary_services(user_packet_handler_t callback,hci_con_handle_t con_handle) { return (uint8_t)0; }
struct gatt_client_discover_primary_services_ctx {struct btstack_mt_event*_event;uint8_t _ret;user_packet_handler_t callback;hci_con_handle_t con_handle;};
static void gatt_client_discover_primary_services_0(struct gatt_client_discover_primary_services_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_discover_primary_services(ctx->callback,ctx->con_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_discover_primary_services(user_packet_handler_t callback,hci_con_handle_t con_handle){if(IS_IN_HOST()){return gatt_client_discover_primary_services(callback,con_handle);}else{struct gatt_client_discover_primary_services_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle};CALL_USER_RET(gatt_client_discover_primary_services);}}
__attribute((weak)) uint8_t gatt_client_discover_primary_services_by_uuid16(user_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t uuid16) { return (uint8_t)0; }
struct gatt_client_discover_primary_services_by_uuid16_ctx {struct btstack_mt_event*_event;uint8_t _ret;user_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t uuid16;};
static void gatt_client_discover_primary_services_by_uuid16_0(struct gatt_client_discover_primary_services_by_uuid16_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_discover_primary_services_by_uuid16(ctx->callback,ctx->con_handle,ctx->uuid16);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_discover_primary_services_by_uuid16(user_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t uuid16){if(IS_IN_HOST()){return gatt_client_discover_primary_services_by_uuid16(callback,con_handle,uuid16);}else{struct gatt_client_discover_primary_services_by_uuid16_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.uuid16 = uuid16};CALL_USER_RET(gatt_client_discover_primary_services_by_uuid16);}}
__attribute((weak)) uint8_t gatt_client_discover_primary_services_by_uuid128(user_packet_handler_t callback,hci_con_handle_t con_handle,const uint8_t * uuid128) { return (uint8_t)0; }
struct gatt_client_discover_primary_services_by_uuid128_ctx {struct btstack_mt_event*_event;uint8_t _ret;user_packet_handler_t callback;hci_con_handle_t con_handle;const uint8_t * uuid128;};
static void gatt_client_discover_primary_services_by_uuid128_0(struct gatt_client_discover_primary_services_by_uuid128_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_discover_primary_services_by_uuid128(ctx->callback,ctx->con_handle,ctx->uuid128);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_discover_primary_services_by_uuid128(user_packet_handler_t callback,hci_con_handle_t con_handle,const uint8_t * uuid128){if(IS_IN_HOST()){return gatt_client_discover_primary_services_by_uuid128(callback,con_handle,uuid128);}else{struct gatt_client_discover_primary_services_by_uuid128_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.uuid128 = uuid128};CALL_USER_RET(gatt_client_discover_primary_services_by_uuid128);}}
__attribute((weak)) uint8_t gatt_client_find_included_services_for_service(user_packet_handler_t callback,hci_con_handle_t con_handle,const uint16_t start_group_handle,const uint16_t end_group_handle) { return (uint8_t)0; }
struct gatt_client_find_included_services_for_service_ctx {struct btstack_mt_event*_event;uint8_t _ret;user_packet_handler_t callback;hci_con_handle_t con_handle;const uint16_t start_group_handle;const uint16_t end_group_handle;};
static void gatt_client_find_included_services_for_service_0(struct gatt_client_find_included_services_for_service_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_find_included_services_for_service(ctx->callback,ctx->con_handle,ctx->start_group_handle,ctx->end_group_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_find_included_services_for_service(user_packet_handler_t callback,hci_con_handle_t con_handle,const uint16_t start_group_handle,const uint16_t end_group_handle){if(IS_IN_HOST()){return gatt_client_find_included_services_for_service(callback,con_handle,start_group_handle,end_group_handle);}else{struct gatt_client_find_included_services_for_service_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.start_group_handle = start_group_handle,.end_group_handle = end_group_handle};CALL_USER_RET(gatt_client_find_included_services_for_service);}}
__attribute((weak)) uint8_t gatt_client_discover_characteristics_for_service(user_packet_handler_t callback,hci_con_handle_t con_handle,const uint16_t start_group_handle,const uint16_t end_group_handle) { return (uint8_t)0; }
struct gatt_client_discover_characteristics_for_service_ctx {struct btstack_mt_event*_event;uint8_t _ret;user_packet_handler_t callback;hci_con_handle_t con_handle;const uint16_t start_group_handle;const uint16_t end_group_handle;};
static void gatt_client_discover_characteristics_for_service_0(struct gatt_client_discover_characteristics_for_service_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_discover_characteristics_for_service(ctx->callback,ctx->con_handle,ctx->start_group_handle,ctx->end_group_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_discover_characteristics_for_service(user_packet_handler_t callback,hci_con_handle_t con_handle,const uint16_t start_group_handle,const uint16_t end_group_handle){if(IS_IN_HOST()){return gatt_client_discover_characteristics_for_service(callback,con_handle,start_group_handle,end_group_handle);}else{struct gatt_client_discover_characteristics_for_service_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.start_group_handle = start_group_handle,.end_group_handle = end_group_handle};CALL_USER_RET(gatt_client_discover_characteristics_for_service);}}
__attribute((weak)) uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid16(btstack_packet_handler_t callback,const hci_con_handle_t con_handle,const uint16_t start_handle,const uint16_t end_handle,const uint16_t uuid16) { return (uint8_t)0; }
struct gatt_client_discover_characteristics_for_handle_range_by_uuid16_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;const hci_con_handle_t con_handle;const uint16_t start_handle;const uint16_t end_handle;const uint16_t uuid16;};
static void gatt_client_discover_characteristics_for_handle_range_by_uuid16_0(struct gatt_client_discover_characteristics_for_handle_range_by_uuid16_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_discover_characteristics_for_handle_range_by_uuid16(ctx->callback,ctx->con_handle,ctx->start_handle,ctx->end_handle,ctx->uuid16);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_discover_characteristics_for_handle_range_by_uuid16(btstack_packet_handler_t callback,const hci_con_handle_t con_handle,const uint16_t start_handle,const uint16_t end_handle,const uint16_t uuid16){if(IS_IN_HOST()){return gatt_client_discover_characteristics_for_handle_range_by_uuid16(callback,con_handle,start_handle,end_handle,uuid16);}else{struct gatt_client_discover_characteristics_for_handle_range_by_uuid16_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.start_handle = start_handle,.end_handle = end_handle,.uuid16 = uuid16};CALL_USER_RET(gatt_client_discover_characteristics_for_handle_range_by_uuid16);}}
__attribute((weak)) uint8_t gatt_client_discover_characteristics_for_handle_range_by_uuid128(btstack_packet_handler_t callback,const hci_con_handle_t con_handle,const uint16_t start_handle,const uint16_t end_handle,const uint8_t * uuid128) { return (uint8_t)0; }
struct gatt_client_discover_characteristics_for_handle_range_by_uuid128_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;const hci_con_handle_t con_handle;const uint16_t start_handle;const uint16_t end_handle;const uint8_t * uuid128;};
static void gatt_client_discover_characteristics_for_handle_range_by_uuid128_0(struct gatt_client_discover_characteristics_for_handle_range_by_uuid128_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_discover_characteristics_for_handle_range_by_uuid128(ctx->callback,ctx->con_handle,ctx->start_handle,ctx->end_handle,ctx->uuid128);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_discover_characteristics_for_handle_range_by_uuid128(btstack_packet_handler_t callback,const hci_con_handle_t con_handle,const uint16_t start_handle,const uint16_t end_handle,const uint8_t * uuid128){if(IS_IN_HOST()){return gatt_client_discover_characteristics_for_handle_range_by_uuid128(callback,con_handle,start_handle,end_handle,uuid128);}else{struct gatt_client_discover_characteristics_for_handle_range_by_uuid128_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.start_handle = start_handle,.end_handle = end_handle,.uuid128 = uuid128};CALL_USER_RET(gatt_client_discover_characteristics_for_handle_range_by_uuid128);}}
__attribute((weak)) uint8_t gatt_client_discover_characteristic_descriptors(btstack_packet_handler_t callback,hci_con_handle_t con_handle,gatt_client_characteristic_t * characteristic) { return (uint8_t)0; }
struct gatt_client_discover_characteristic_descriptors_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;gatt_client_characteristic_t * characteristic;};
static void gatt_client_discover_characteristic_descriptors_0(struct gatt_client_discover_characteristic_descriptors_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_discover_characteristic_descriptors(ctx->callback,ctx->con_handle,ctx->characteristic);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_discover_characteristic_descriptors(btstack_packet_handler_t callback,hci_con_handle_t con_handle,gatt_client_characteristic_t * characteristic){if(IS_IN_HOST()){return gatt_client_discover_characteristic_descriptors(callback,con_handle,characteristic);}else{struct gatt_client_discover_characteristic_descriptors_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic = characteristic};CALL_USER_RET(gatt_client_discover_characteristic_descriptors);}}
__attribute((weak)) uint8_t gatt_client_read_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle) { return (uint8_t)0; }
struct gatt_client_read_value_of_characteristic_using_value_handle_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;};
static void gatt_client_read_value_of_characteristic_using_value_handle_0(struct gatt_client_read_value_of_characteristic_using_value_handle_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_value_of_characteristic_using_value_handle(ctx->callback,ctx->con_handle,ctx->characteristic_value_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle){if(IS_IN_HOST()){return gatt_client_read_value_of_characteristic_using_value_handle(callback,con_handle,characteristic_value_handle);}else{struct gatt_client_read_value_of_characteristic_using_value_handle_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle};CALL_USER_RET(gatt_client_read_value_of_characteristic_using_value_handle);}}
__attribute((weak)) uint8_t gatt_client_read_value_of_characteristics_by_uuid16(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t start_handle,uint16_t end_handle,uint16_t uuid16) { return (uint8_t)0; }
struct gatt_client_read_value_of_characteristics_by_uuid16_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t start_handle;uint16_t end_handle;uint16_t uuid16;};
static void gatt_client_read_value_of_characteristics_by_uuid16_0(struct gatt_client_read_value_of_characteristics_by_uuid16_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_value_of_characteristics_by_uuid16(ctx->callback,ctx->con_handle,ctx->start_handle,ctx->end_handle,ctx->uuid16);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_value_of_characteristics_by_uuid16(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t start_handle,uint16_t end_handle,uint16_t uuid16){if(IS_IN_HOST()){return gatt_client_read_value_of_characteristics_by_uuid16(callback,con_handle,start_handle,end_handle,uuid16);}else{struct gatt_client_read_value_of_characteristics_by_uuid16_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.start_handle = start_handle,.end_handle = end_handle,.uuid16 = uuid16};CALL_USER_RET(gatt_client_read_value_of_characteristics_by_uuid16);}}
__attribute((weak)) uint8_t gatt_client_read_value_of_characteristics_by_uuid128(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t start_handle,uint16_t end_handle,uint8_t * uuid128) { return (uint8_t)0; }
struct gatt_client_read_value_of_characteristics_by_uuid128_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t start_handle;uint16_t end_handle;uint8_t * uuid128;};
static void gatt_client_read_value_of_characteristics_by_uuid128_0(struct gatt_client_read_value_of_characteristics_by_uuid128_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_value_of_characteristics_by_uuid128(ctx->callback,ctx->con_handle,ctx->start_handle,ctx->end_handle,ctx->uuid128);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_value_of_characteristics_by_uuid128(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t start_handle,uint16_t end_handle,uint8_t * uuid128){if(IS_IN_HOST()){return gatt_client_read_value_of_characteristics_by_uuid128(callback,con_handle,start_handle,end_handle,uuid128);}else{struct gatt_client_read_value_of_characteristics_by_uuid128_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.start_handle = start_handle,.end_handle = end_handle,.uuid128 = uuid128};CALL_USER_RET(gatt_client_read_value_of_characteristics_by_uuid128);}}
__attribute((weak)) uint8_t gatt_client_read_long_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle) { return (uint8_t)0; }
struct gatt_client_read_long_value_of_characteristic_using_value_handle_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;};
static void gatt_client_read_long_value_of_characteristic_using_value_handle_0(struct gatt_client_read_long_value_of_characteristic_using_value_handle_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_long_value_of_characteristic_using_value_handle(ctx->callback,ctx->con_handle,ctx->characteristic_value_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_long_value_of_characteristic_using_value_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle){if(IS_IN_HOST()){return gatt_client_read_long_value_of_characteristic_using_value_handle(callback,con_handle,characteristic_value_handle);}else{struct gatt_client_read_long_value_of_characteristic_using_value_handle_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle};CALL_USER_RET(gatt_client_read_long_value_of_characteristic_using_value_handle);}}
__attribute((weak)) uint8_t gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t offset) { return (uint8_t)0; }
struct gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;uint16_t offset;};
static void gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset_0(struct gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset(ctx->callback,ctx->con_handle,ctx->characteristic_value_handle,ctx->offset);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t offset){if(IS_IN_HOST()){return gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset(callback,con_handle,characteristic_value_handle,offset);}else{struct gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle,.offset = offset};CALL_USER_RET(gatt_client_read_long_value_of_characteristic_using_value_handle_with_offset);}}
__attribute((weak)) uint8_t gatt_client_read_multiple_characteristic_values(btstack_packet_handler_t callback,hci_con_handle_t con_handle,int num_value_handles,uint16_t * value_handles) { return (uint8_t)0; }
struct gatt_client_read_multiple_characteristic_values_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;int num_value_handles;uint16_t * value_handles;};
static void gatt_client_read_multiple_characteristic_values_0(struct gatt_client_read_multiple_characteristic_values_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_multiple_characteristic_values(ctx->callback,ctx->con_handle,ctx->num_value_handles,ctx->value_handles);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_multiple_characteristic_values(btstack_packet_handler_t callback,hci_con_handle_t con_handle,int num_value_handles,uint16_t * value_handles){if(IS_IN_HOST()){return gatt_client_read_multiple_characteristic_values(callback,con_handle,num_value_handles,value_handles);}else{struct gatt_client_read_multiple_characteristic_values_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.num_value_handles = num_value_handles,.value_handles = value_handles};CALL_USER_RET(gatt_client_read_multiple_characteristic_values);}}
__attribute((weak)) uint8_t gatt_client_write_value_of_characteristic_without_response(hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gatt_client_write_value_of_characteristic_without_response_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;uint16_t length;const uint8_t * data;};
static void gatt_client_write_value_of_characteristic_without_response_0(struct gatt_client_write_value_of_characteristic_without_response_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_value_of_characteristic_without_response(ctx->con_handle,ctx->characteristic_value_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_value_of_characteristic_without_response(hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gatt_client_write_value_of_characteristic_without_response(con_handle,characteristic_value_handle,length,data);}else{struct gatt_client_write_value_of_characteristic_without_response_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle,.length = length,.data = data};CALL_USER_RET(gatt_client_write_value_of_characteristic_without_response);}}
__attribute((weak)) uint8_t gatt_client_signed_write_without_response(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t handle,uint16_t message_len,const uint8_t * message) { return (uint8_t)0; }
struct gatt_client_signed_write_without_response_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t handle;uint16_t message_len;const uint8_t * message;};
static void gatt_client_signed_write_without_response_0(struct gatt_client_signed_write_without_response_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_signed_write_without_response(ctx->callback,ctx->con_handle,ctx->handle,ctx->message_len,ctx->message);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_signed_write_without_response(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t handle,uint16_t message_len,const uint8_t * message){if(IS_IN_HOST()){return gatt_client_signed_write_without_response(callback,con_handle,handle,message_len,message);}else{struct gatt_client_signed_write_without_response_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.handle = handle,.message_len = message_len,.message = message};CALL_USER_RET(gatt_client_signed_write_without_response);}}
__attribute((weak)) uint8_t gatt_client_write_value_of_characteristic(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gatt_client_write_value_of_characteristic_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;uint16_t length;const uint8_t * data;};
static void gatt_client_write_value_of_characteristic_0(struct gatt_client_write_value_of_characteristic_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_value_of_characteristic(ctx->callback,ctx->con_handle,ctx->characteristic_value_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_value_of_characteristic(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gatt_client_write_value_of_characteristic(callback,con_handle,characteristic_value_handle,length,data);}else{struct gatt_client_write_value_of_characteristic_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle,.length = length,.data = data};CALL_USER_RET(gatt_client_write_value_of_characteristic);}}
__attribute((weak)) uint8_t gatt_client_write_long_value_of_characteristic(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gatt_client_write_long_value_of_characteristic_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;uint16_t length;const uint8_t * data;};
static void gatt_client_write_long_value_of_characteristic_0(struct gatt_client_write_long_value_of_characteristic_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_long_value_of_characteristic(ctx->callback,ctx->con_handle,ctx->characteristic_value_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_long_value_of_characteristic(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gatt_client_write_long_value_of_characteristic(callback,con_handle,characteristic_value_handle,length,data);}else{struct gatt_client_write_long_value_of_characteristic_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle,.length = length,.data = data};CALL_USER_RET(gatt_client_write_long_value_of_characteristic);}}
__attribute((weak)) uint8_t gatt_client_write_long_value_of_characteristic_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t offset,uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gatt_client_write_long_value_of_characteristic_with_offset_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;uint16_t offset;uint16_t length;const uint8_t * data;};
static void gatt_client_write_long_value_of_characteristic_with_offset_0(struct gatt_client_write_long_value_of_characteristic_with_offset_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_long_value_of_characteristic_with_offset(ctx->callback,ctx->con_handle,ctx->characteristic_value_handle,ctx->offset,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_long_value_of_characteristic_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t offset,uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gatt_client_write_long_value_of_characteristic_with_offset(callback,con_handle,characteristic_value_handle,offset,length,data);}else{struct gatt_client_write_long_value_of_characteristic_with_offset_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle,.offset = offset,.length = length,.data = data};CALL_USER_RET(gatt_client_write_long_value_of_characteristic_with_offset);}}
__attribute((weak)) uint8_t gatt_client_reliable_write_long_value_of_characteristic(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data) { return (uint8_t)0; }
struct gatt_client_reliable_write_long_value_of_characteristic_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t characteristic_value_handle;uint16_t length;const uint8_t * data;};
static void gatt_client_reliable_write_long_value_of_characteristic_0(struct gatt_client_reliable_write_long_value_of_characteristic_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_reliable_write_long_value_of_characteristic(ctx->callback,ctx->con_handle,ctx->characteristic_value_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_reliable_write_long_value_of_characteristic(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t characteristic_value_handle,uint16_t length,const uint8_t * data){if(IS_IN_HOST()){return gatt_client_reliable_write_long_value_of_characteristic(callback,con_handle,characteristic_value_handle,length,data);}else{struct gatt_client_reliable_write_long_value_of_characteristic_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic_value_handle = characteristic_value_handle,.length = length,.data = data};CALL_USER_RET(gatt_client_reliable_write_long_value_of_characteristic);}}
__attribute((weak)) uint8_t gatt_client_read_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle) { return (uint8_t)0; }
struct gatt_client_read_characteristic_descriptor_using_descriptor_handle_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t descriptor_handle;};
static void gatt_client_read_characteristic_descriptor_using_descriptor_handle_0(struct gatt_client_read_characteristic_descriptor_using_descriptor_handle_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_characteristic_descriptor_using_descriptor_handle(ctx->callback,ctx->con_handle,ctx->descriptor_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle){if(IS_IN_HOST()){return gatt_client_read_characteristic_descriptor_using_descriptor_handle(callback,con_handle,descriptor_handle);}else{struct gatt_client_read_characteristic_descriptor_using_descriptor_handle_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.descriptor_handle = descriptor_handle};CALL_USER_RET(gatt_client_read_characteristic_descriptor_using_descriptor_handle);}}
__attribute((weak)) uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle) { return (uint8_t)0; }
struct gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t descriptor_handle;};
static void gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_0(struct gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_long_characteristic_descriptor_using_descriptor_handle(ctx->callback,ctx->con_handle,ctx->descriptor_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle){if(IS_IN_HOST()){return gatt_client_read_long_characteristic_descriptor_using_descriptor_handle(callback,con_handle,descriptor_handle);}else{struct gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.descriptor_handle = descriptor_handle};CALL_USER_RET(gatt_client_read_long_characteristic_descriptor_using_descriptor_handle);}}
__attribute((weak)) uint8_t gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t offset) { return (uint8_t)0; }
struct gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t descriptor_handle;uint16_t offset;};
static void gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset_0(struct gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset(ctx->callback,ctx->con_handle,ctx->descriptor_handle,ctx->offset);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t offset){if(IS_IN_HOST()){return gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset(callback,con_handle,descriptor_handle,offset);}else{struct gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.descriptor_handle = descriptor_handle,.offset = offset};CALL_USER_RET(gatt_client_read_long_characteristic_descriptor_using_descriptor_handle_with_offset);}}
__attribute((weak)) uint8_t gatt_client_write_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t length,uint8_t * data) { return (uint8_t)0; }
struct gatt_client_write_characteristic_descriptor_using_descriptor_handle_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t descriptor_handle;uint16_t length;uint8_t * data;};
static void gatt_client_write_characteristic_descriptor_using_descriptor_handle_0(struct gatt_client_write_characteristic_descriptor_using_descriptor_handle_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_characteristic_descriptor_using_descriptor_handle(ctx->callback,ctx->con_handle,ctx->descriptor_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t length,uint8_t * data){if(IS_IN_HOST()){return gatt_client_write_characteristic_descriptor_using_descriptor_handle(callback,con_handle,descriptor_handle,length,data);}else{struct gatt_client_write_characteristic_descriptor_using_descriptor_handle_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.descriptor_handle = descriptor_handle,.length = length,.data = data};CALL_USER_RET(gatt_client_write_characteristic_descriptor_using_descriptor_handle);}}
__attribute((weak)) uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t length,uint8_t * data) { return (uint8_t)0; }
struct gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t descriptor_handle;uint16_t length;uint8_t * data;};
static void gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_0(struct gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_long_characteristic_descriptor_using_descriptor_handle(ctx->callback,ctx->con_handle,ctx->descriptor_handle,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_long_characteristic_descriptor_using_descriptor_handle(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t length,uint8_t * data){if(IS_IN_HOST()){return gatt_client_write_long_characteristic_descriptor_using_descriptor_handle(callback,con_handle,descriptor_handle,length,data);}else{struct gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.descriptor_handle = descriptor_handle,.length = length,.data = data};CALL_USER_RET(gatt_client_write_long_characteristic_descriptor_using_descriptor_handle);}}
__attribute((weak)) uint8_t gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t offset,uint16_t length,uint8_t * data) { return (uint8_t)0; }
struct gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t descriptor_handle;uint16_t offset;uint16_t length;uint8_t * data;};
static void gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset_0(struct gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset(ctx->callback,ctx->con_handle,ctx->descriptor_handle,ctx->offset,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t descriptor_handle,uint16_t offset,uint16_t length,uint8_t * data){if(IS_IN_HOST()){return gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset(callback,con_handle,descriptor_handle,offset,length,data);}else{struct gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.descriptor_handle = descriptor_handle,.offset = offset,.length = length,.data = data};CALL_USER_RET(gatt_client_write_long_characteristic_descriptor_using_descriptor_handle_with_offset);}}
__attribute((weak)) uint8_t gatt_client_write_client_characteristic_configuration(btstack_packet_handler_t callback,hci_con_handle_t con_handle,gatt_client_characteristic_t * characteristic,uint16_t configuration) { return (uint8_t)0; }
struct gatt_client_write_client_characteristic_configuration_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;gatt_client_characteristic_t * characteristic;uint16_t configuration;};
static void gatt_client_write_client_characteristic_configuration_0(struct gatt_client_write_client_characteristic_configuration_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_write_client_characteristic_configuration(ctx->callback,ctx->con_handle,ctx->characteristic,ctx->configuration);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_write_client_characteristic_configuration(btstack_packet_handler_t callback,hci_con_handle_t con_handle,gatt_client_characteristic_t * characteristic,uint16_t configuration){if(IS_IN_HOST()){return gatt_client_write_client_characteristic_configuration(callback,con_handle,characteristic,configuration);}else{struct gatt_client_write_client_characteristic_configuration_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.characteristic = characteristic,.configuration = configuration};CALL_USER_RET(gatt_client_write_client_characteristic_configuration);}}
__attribute((weak)) uint8_t gatt_client_prepare_write(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t attribute_handle,uint16_t offset,uint16_t length,uint8_t * data) { return (uint8_t)0; }
struct gatt_client_prepare_write_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;uint16_t attribute_handle;uint16_t offset;uint16_t length;uint8_t * data;};
static void gatt_client_prepare_write_0(struct gatt_client_prepare_write_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_prepare_write(ctx->callback,ctx->con_handle,ctx->attribute_handle,ctx->offset,ctx->length,ctx->data);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_prepare_write(btstack_packet_handler_t callback,hci_con_handle_t con_handle,uint16_t attribute_handle,uint16_t offset,uint16_t length,uint8_t * data){if(IS_IN_HOST()){return gatt_client_prepare_write(callback,con_handle,attribute_handle,offset,length,data);}else{struct gatt_client_prepare_write_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle,.attribute_handle = attribute_handle,.offset = offset,.length = length,.data = data};CALL_USER_RET(gatt_client_prepare_write);}}
__attribute((weak)) uint8_t gatt_client_execute_write(btstack_packet_handler_t callback,hci_con_handle_t con_handle) { return (uint8_t)0; }
struct gatt_client_execute_write_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;};
static void gatt_client_execute_write_0(struct gatt_client_execute_write_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_execute_write(ctx->callback,ctx->con_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_execute_write(btstack_packet_handler_t callback,hci_con_handle_t con_handle){if(IS_IN_HOST()){return gatt_client_execute_write(callback,con_handle);}else{struct gatt_client_execute_write_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle};CALL_USER_RET(gatt_client_execute_write);}}
__attribute((weak)) uint8_t gatt_client_cancel_write(btstack_packet_handler_t callback,hci_con_handle_t con_handle) { return (uint8_t)0; }
struct gatt_client_cancel_write_ctx {struct btstack_mt_event*_event;uint8_t _ret;btstack_packet_handler_t callback;hci_con_handle_t con_handle;};
static void gatt_client_cancel_write_0(struct gatt_client_cancel_write_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_cancel_write(ctx->callback,ctx->con_handle);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_cancel_write(btstack_packet_handler_t callback,hci_con_handle_t con_handle){if(IS_IN_HOST()){return gatt_client_cancel_write(callback,con_handle);}else{struct gatt_client_cancel_write_ctx ctx = {._event = btstack_mt_event_alloc(),.callback = callback,.con_handle = con_handle};CALL_USER_RET(gatt_client_cancel_write);}}
__attribute((weak)) int gatt_client_is_ready(hci_con_handle_t con_handle) { return (int)0; }
struct gatt_client_is_ready_ctx {struct btstack_mt_event*_event;int _ret;hci_con_handle_t con_handle;};
static void gatt_client_is_ready_0(struct gatt_client_is_ready_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_is_ready(ctx->con_handle);btstack_mt_event_set(ctx->_event);}
int mt_gatt_client_is_ready(hci_con_handle_t con_handle){if(IS_IN_HOST()){return gatt_client_is_ready(con_handle);}else{struct gatt_client_is_ready_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle};CALL_USER_RET(gatt_client_is_ready);}}
__attribute((weak)) uint8_t gatt_client_get_mtu(hci_con_handle_t con_handle,uint16_t * mtu) { return (uint8_t)0; }
struct gatt_client_get_mtu_ctx {struct btstack_mt_event*_event;uint8_t _ret;hci_con_handle_t con_handle;uint16_t * mtu;};
static void gatt_client_get_mtu_0(struct gatt_client_get_mtu_ctx*ctx,uint16_t _){ctx->_ret =gatt_client_get_mtu(ctx->con_handle,ctx->mtu);btstack_mt_event_set(ctx->_event);}
uint8_t mt_gatt_client_get_mtu(hci_con_handle_t con_handle,uint16_t * mtu){if(IS_IN_HOST()){return gatt_client_get_mtu(con_handle,mtu);}else{struct gatt_client_get_mtu_ctx ctx = {._event = btstack_mt_event_alloc(),.con_handle = con_handle,.mtu = mtu};CALL_USER_RET(gatt_client_get_mtu);}}
__attribute((weak)) void gatt_client_listen_for_characteristic_value_updates(gatt_client_notification_t * notification,btstack_packet_handler_t packet_handler,hci_con_handle_t con_handle,uint16_t value_handle) { }
struct gatt_client_listen_for_characteristic_value_updates_ctx {struct btstack_mt_event*_event;gatt_client_notification_t * notification;btstack_packet_handler_t packet_handler;hci_con_handle_t con_handle;uint16_t value_handle;};
static void gatt_client_listen_for_characteristic_value_updates_0(struct gatt_client_listen_for_characteristic_value_updates_ctx*ctx,uint16_t _){gatt_client_listen_for_characteristic_value_updates(ctx->notification,ctx->packet_handler,ctx->con_handle,ctx->value_handle);btstack_mt_event_set(ctx->_event);}
void mt_gatt_client_listen_for_characteristic_value_updates(gatt_client_notification_t * notification,btstack_packet_handler_t packet_handler,hci_con_handle_t con_handle,uint16_t value_handle){if(IS_IN_HOST()){gatt_client_listen_for_characteristic_value_updates(notification,packet_handler,con_handle,value_handle);}else{struct gatt_client_listen_for_characteristic_value_updates_ctx ctx = {._event = btstack_mt_event_alloc(),.notification = notification,.packet_handler = packet_handler,.con_handle = con_handle,.value_handle = value_handle};CALL_USER_VOID(gatt_client_listen_for_characteristic_value_updates);}}
